<div id="content">
	<div class="row s_page_title">
		<sa-big-breadcrumbs [items]="['系统配置','调度管理']" icon="fa fa-cog" class="col-xs-12 col-sm-7 col-md-7 col-lg-4"></sa-big-breadcrumbs>
	</div>
	<sa-widgets-grid>
		<div class="s_table">
			<div sa-widget [editbutton]="false" color="darken" class="clearfix">
				<header><span class="widget-icon"> <i class="fa fa-table"></i> </span><h2>调度管理</h2></header>
				<div>
					<div class="widget-body no-padding">
						<div class="page-header clearfix s_table_opreation">
							<div class="left page-header-btn">
								<button  type="button"  class="btn btn-primary" (click)="new_scheduling()">添加</button>
							</div>
							<div class="right top-search">
								<input type="text" [(ngModel)]="searchKey" (change)="table_search(searchKey)" class="search-input" placeholder="任务名称...">
								<span class="top-search-box">
							        <button class="top-search-btn" type="button" (click)="table_search(searchKey)"> <i class="fa fa-search"></i></button>
							    </span>
							</div>
						</div>
						<div class="table_scroll">
							<table class="display dataTables responsive table table-striped table-bordered table-hover dataTable s_h5_table">
								<thead>
									<tr>
										<th>编号</th>
										<th>任务名称</th>
										<th>类全路径名称</th>
										<th>方法名</th>
										<th>corn表达式</th>
										<th>任务描述</th>
										<th>是否启动</th>
										<th>有无状态</th>
										<th>操作</th>
									</tr>
								</thead>
								<tbody>
									<tr *ngFor="let row of tableData" >
										<td>{{row.id}}</td>
										<td>{{row.jobName}}</td>
										<td>{{row.beanClass}}</td>
										<td>{{row.methodName}}</td>
										<td>{{row.cronExpression}}</td>
										<td>{{row.description}}</td>
										<td>
											<span *ngIf="row.jobStatus === '0'" class="red">已停止</span>
					            			<span *ngIf="row.jobStatus === '1'" class="green">已启动</span>
										</td>
										<td>
											<span *ngIf="row.isConcurrent === '0'" class="green">有</span>
					            			<span *ngIf="row.isConcurrent === '1'" style="color: #bbb;">无</span>
										</td>
										<td>
										  	<button  type="button" (click)='config_scheduling(row)'>配置</button>
											<button  type="button" (click)='updata_scheduling(row)'>编辑</button>
											<button  type="button" (click)='del_scheduling(row)'>删除</button>
								            <button  type="button" *ngIf="row.jobStatus === '0'" (click)='updateStatus(row,"open","启动")'>启动</button>
								            <button  type="button" *ngIf="row.jobStatus === '1'" (click)='updateStatus(row,"stop","停止")'>停止</button>
								            <button  type="button" *ngIf="row.jobStatus === '1'" (click)='updateStatus(row,"start","立即执行")'>立即执行</button>
										</td>
									</tr>
								</tbody>
							</table>
						</div>
						<div class="table-fix clearfix">
							<paginator [totalRecords]="totalCount"
						           [rows]="pageSize"
						           [currentPage]="curPage - 1"
						           (onPageChange)="paginate($event)">
							</paginator>
							<button type="button" class="btn default refresh_btn" (click)="refresh()"><i class="fa fa-refresh"></i></button>
						</div>
					</div>
				</div>
			</div>
		</div>
	</sa-widgets-grid>
</div>
